package main

import (
	"baize/app/business/system/systemModels"
	"baize/app/datasource"
	"context"
	"go.mongodb.org/mongo-driver/mongo"
)

func InsertDict(c context.Context, m *mongo.Client) {
	collection := m.Database(datasource.SysDatabase).Collection(datasource.Collection["deptType"])
	dictType := make([]interface{}, 0)
	dictType = append(dictType, &systemModels.SysDictType{DictId: 1, DictName: "用户性别", DictType: "sys_user_sex", Status: "0", Remark: "用户性别列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 2, DictName: "菜单状态", DictType: "sys_show_hide", Status: "0", Remark: "菜单状态列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 3, DictName: "系统开关", DictType: "sys_normal_disable", Status: "0", Remark: "系统开关列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 4, DictName: "任务状态", DictType: "sys_job_status", Status: "0", Remark: "任务状态列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 5, DictName: "任务分组", DictType: "sys_job_group", Status: "0", Remark: "任务分组列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 6, DictName: "系统是否", DictType: "sys_yes_no", Status: "0", Remark: "系统是否列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 7, DictName: "通知类型", DictType: "sys_notice_type", Status: "0", Remark: "通知类型列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 8, DictName: "通知状态", DictType: "sys_notice_status", Status: "0", Remark: "通知状态列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 9, DictName: "操作类型", DictType: "sys_oper_type", Status: "0", Remark: "操作类型列表", BaseEntity: be})
	dictType = append(dictType, &systemModels.SysDictType{DictId: 10, DictName: "系统状态", DictType: "sys_common_status", Status: "0", Remark: "登录状态列表", BaseEntity: be})
	_, err := collection.InsertMany(c, dictType)
	if err != nil {
		panic(err)
	}
	collection = m.Database(datasource.SysDatabase).Collection(datasource.Collection["deptData"])
	dictData := make([]interface{}, 0)
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 1, DictSort: 1, DictLabel: "男", DictValue: "0", DictType: "sys_user_sex", ListClass: "", IsDefault: "Y", Status: "0", Remark: "性别男", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 2, DictSort: 2, DictLabel: "女", DictValue: "1", DictType: "sys_user_sex", ListClass: "", IsDefault: "N", Status: "0", Remark: "性别女", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 3, DictSort: 3, DictLabel: "未知", DictValue: "2", DictType: "sys_user_sex", ListClass: "", IsDefault: "N", Status: "0", Remark: "性别未知", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 4, DictSort: 1, DictLabel: "显示", DictValue: "0", DictType: "sys_show_hide", ListClass: "primary", IsDefault: "Y", Status: "0", Remark: "显示菜单", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 5, DictSort: 2, DictLabel: "隐藏", DictValue: "1", DictType: "sys_show_hide", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "隐藏菜单", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 6, DictSort: 1, DictLabel: "正常", DictValue: "0", DictType: "sys_normal_disable", ListClass: "primary", IsDefault: "Y", Status: "0", Remark: "正常状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 7, DictSort: 2, DictLabel: "停用", DictValue: "1", DictType: "sys_normal_disable", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "停用状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 8, DictSort: 1, DictLabel: "正常", DictValue: "0", DictType: "sys_job_status", ListClass: "primary", IsDefault: "Y", Status: "0", Remark: "正常状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 9, DictSort: 2, DictLabel: "暂停", DictValue: "1", DictType: "sys_job_status", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "停用状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 10, DictSort: 1, DictLabel: "默认", DictValue: "DEFAULT", DictType: "sys_job_group", ListClass: "", IsDefault: "Y", Status: "0", Remark: "默认分组", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 11, DictSort: 2, DictLabel: "系统", DictValue: "SYSTEM", DictType: "sys_job_group", ListClass: "", IsDefault: "N", Status: "0", Remark: "系统分组", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 12, DictSort: 1, DictLabel: "是", DictValue: "Y", DictType: "sys_yes_no", ListClass: "primary", IsDefault: "Y", Status: "0", Remark: "系统默认是", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 13, DictSort: 2, DictLabel: "否", DictValue: "N", DictType: "sys_yes_no", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "系统默认否", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 14, DictSort: 1, DictLabel: "通知", DictValue: "1", DictType: "sys_notice_type", ListClass: "warning", IsDefault: "Y", Status: "0", Remark: "通知", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 15, DictSort: 2, DictLabel: "公告", DictValue: "2", DictType: "sys_notice_type", ListClass: "success", IsDefault: "N", Status: "0", Remark: "公告", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 16, DictSort: 1, DictLabel: "正常", DictValue: "0", DictType: "sys_notice_status", ListClass: "primary", IsDefault: "Y", Status: "0", Remark: "正常状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 17, DictSort: 2, DictLabel: "关闭", DictValue: "1", DictType: "sys_notice_status", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "关闭状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 18, DictSort: 0, DictLabel: "其他", DictValue: "0", DictType: "sys_oper_type", ListClass: "info", IsDefault: "N", Status: "0", Remark: "其他操作", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 19, DictSort: 1, DictLabel: "新增", DictValue: "1", DictType: "sys_oper_type", ListClass: "info", IsDefault: "N", Status: "0", Remark: "新增操作", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 20, DictSort: 2, DictLabel: "修改", DictValue: "2", DictType: "sys_oper_type", ListClass: "info", IsDefault: "N", Status: "0", Remark: "修改操作", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 21, DictSort: 3, DictLabel: "删除", DictValue: "3", DictType: "sys_oper_type", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "删除操作", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 25, DictSort: 4, DictLabel: "强退", DictValue: "4", DictType: "sys_oper_type", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "强退操作", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 27, DictSort: 5, DictLabel: "清空数据", DictValue: "5", DictType: "sys_oper_type", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "清空操作", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 28, DictSort: 1, DictLabel: "成功", DictValue: "0", DictType: "sys_common_status", ListClass: "primary", IsDefault: "N", Status: "0", Remark: "正常状态", BaseEntity: be})
	dictData = append(dictData, &systemModels.SysDictData{DictCode: 29, DictSort: 2, DictLabel: "失败", DictValue: "1", DictType: "sys_common_status", ListClass: "danger", IsDefault: "N", Status: "0", Remark: "停用状态", BaseEntity: be})
	_, err = collection.InsertMany(c, dictData)
	if err != nil {
		panic(err)
	}
}
